﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ins = LEET.StandardModules.Instructions;
using LEET.CommonInterfaces.Compilers;
using LEET.CommonInterfaces.TestControls;


namespace Tedds_Tool.Instructions.Actions
{
    public class Move : Ins.Action
    {
        double x_offset;
        double y_offset;

        public Move(String[] args)
            : base(args)
        {
            x_offset = double.Parse(args[3].Trim());
            y_offset = double.Parse(args[4].Trim());
        }

        public static IAutomationActionResult StaticCall()
        {
            //TODO
            return null;
        }

        public override String RenderStaticCall()
        {
            //TODO
            return "Tedds_Tool.Instructions.Actions.Move.StaticCall()";
        }

        [Obsolete("This should now be replaced by RenderStaticCall", false)]
        protected override String MethodBody(AssertionSet asserts)
        {
            String pattern = "TransformPattern";
            String action = "Move(" + x_offset + ", " + y_offset + ")";
            return MethodBody(pattern, action);
        }

        public override string PlainText()
        {
            return "Moved " + element + " to screen coordinates: x = " + x_offset + ", y = " + y_offset;
        }
    }
}
